package com.xoa.controller.party;


import com.xoa.model.party.EnDispute;
import com.xoa.service.party.EnDisputeService;
import com.xoa.util.ToJson;
import com.xoa.util.common.newwrapper.BaseWrapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by gsb on 2018/1/10.
 */
@Controller
@RequestMapping("/enDispute")
public class EnDisputeController {

    @Resource
    private EnDisputeService enDisputeService;

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10 下午13:10:51
     * 类介绍  :   查找登陆人的信息
     * 构造参数:
     *
     */
    @RequestMapping(value ="queryUser")
    @ResponseBody
    public ToJson<EnDispute> queryUser(HttpServletRequest request){
        return enDisputeService.queryUser(request);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10 上午10:10:51
     * 类介绍  :   新建
     * 构造参数:
     *
     */
    @RequestMapping(value ="insertSelective")
    @ResponseBody
    public ToJson<EnDispute> insertSelective(EnDispute enDispute, HttpServletRequest request){
        return enDisputeService.insertSelective(enDispute, request);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10  下午13:10:51
     * 类介绍  :   删除
     * 构造参数:
     *
     */
    @RequestMapping(value ="deleteByPrimaryKey")
    @ResponseBody
    public ToJson<EnDispute> deleteByPrimaryKey(Integer cid){
        return enDisputeService.deleteByPrimaryKey(cid);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10  下午13:50:51
     * 类介绍  :   修改
     * 构造参数:
     *
     */
    @RequestMapping(value ="updateByPrimaryKeySelective")
    @ResponseBody
    public ToJson<EnDispute> updateByPrimaryKeySelective(EnDispute enDispute){
        return enDisputeService.updateByPrimaryKeySelective(enDispute);
    }

    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10  下午14:00:51
     * 类介绍  :  详情
     * 构造参数:
     *
     */
    @RequestMapping(value ="selectById")
    @ResponseBody
    public ToJson<EnDispute> selectById(Integer cid){
        return enDisputeService.selectById(cid);
    }
    /**
     *
     * 创建作者:   季佳伟
     * 创建日期:   2018-1-10  下午14:30:51
     * 类介绍  :  列表
     * 构造参数:
     *
     */
    @RequestMapping(value ="queryList")
    @ResponseBody
    public ToJson<EnDispute> queryList(EnDispute enDispute, Integer page, Integer pageSize,
                                       boolean useFlag, HttpServletRequest request, HttpServletResponse response, String export){
        return enDisputeService.queryList(enDispute, page, pageSize, useFlag, request, response, export);
    }


    @RequestMapping("/outPutFile")
    @ResponseBody
    public BaseWrapper outPutFile(HttpServletRequest request, HttpServletResponse response){
        return enDisputeService.outPutFile(request,response);
    }
}
